'''
Created on 07.12.2012

@author: MBikman
'''
import sys, os
from functools import partial

from osm_utils import *
from search_runners import *
from problem_generator import *
from map_problem import *


#def heavyPart():
#    '''
#    Performs a highly resources consuming actions
#    '''

# not buffer stdout
#sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)

map = CountryMap().LoadMap()
    #return map

#def lightPart(map):
#    '''
#	Put your calculations here
#    '''
#IsReachable(map, 364323, 109575)
#IsReachable(map, 425778, 271300)
#IsReachable(map, 139560, 747266)
#RunAstar(map, 364323, 109575, C_c, H_c)
#RunAstar(map, 364323, 109575, C_f, H_f)
#RunAstar(map, 425778, 271300, C_c, H_c)
#RunAstar(map, 425778, 271300, C_f, H_f)

#node7 = RunAstar(map, 715490, 800256, C_c, H_c)
#node7a = RunAstar(map, 715490, 800256, C_c, H_s)

#node8a = RunAstar(map, 715490, 800256, C_c, H_c)
#node8b = RunAstar(map, 715490, 800256, C_f, H_f)
# C_s not meant to ran alone... node8c = RunAstar(map, 715490, 800256, C_s, H_s)

#RunWeightedAstar(map, 715490, 800256, C_c, H_c, 0.5)
#RunWeightedAstar(map, 715490, 800256, C_c, H_c, 0.01)
#RunWeightedAstar(map, 715490, 800256, C_c, H_c, 0.99)
#RunWeightedAstar(map, 715490, 800256, C_c, H_c, 1)
#RunWeightedAstar(map, 715490, 800256, C_c, H_c, 0)

#RunSigmaAstar(map, 715490, 800256, (1, 0))
#RunSigmaAstar(map, 715490, 800256, (0, 1))
#RunSigmaAstar(map, 715490, 800256, (0.0001, 0.001))
#RunSigmaAstar(map, 715490, 800256, (0.4, 0.4))

#GenerateProblemSet(map)
#SaveToFile('ProblemSet100.csv', GenerateProblemSet(map))

#if __name__ == '__main__':
#    raise Exception('You should run wrapper.py instead!')
    
    
